package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.IDensiteDao;
import com.adderis.soft.domain.model.Densite;
import com.adderis.soft.service.IDensiteBo;

@Service("densiteService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class DensiteServiceImpl implements IDensiteBo {


	@Autowired
	private IDensiteDao densiteDao;

	@Transactional(readOnly = false)
	public void persist(Densite transientDensite) {
		densiteDao.persist(transientDensite);

	}

	@Transactional(readOnly = false)
	public void remove(Densite persistentDensite) {
		densiteDao.remove(persistentDensite);

	}

	@Transactional(readOnly = false)
	public Densite merge(Densite detachedDensite) {

		return densiteDao.merge(detachedDensite);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		densiteDao.remove(id);

	}

	public Densite findById(Integer id) {
		return densiteDao.findById(id);
	}

	public List<Densite> findAll() {
		return densiteDao.findAll();
	}

	public List<Densite> search(String searchString) {
		return densiteDao.search(searchString);
	}

	

}
